package com.tyqx.hashchainbean.module;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;
import java.util.Date;

public class ProducePlan implements Serializable {
    private Integer id;

    private String userName;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date produceTime;

    private String produceName;

    private String produceUnit;

    private Integer produceNum;

    private Integer producePeriod;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    private String hashValue;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName == null ? null : userName.trim();
    }

    public Date getProduceTime() {
        return produceTime;
    }

    public void setProduceTime(Date produceTime) {
        this.produceTime = produceTime;
    }

    public String getProduceName() {
        return produceName;
    }

    public void setProduceName(String produceName) {
        this.produceName = produceName == null ? null : produceName.trim();
    }

    public String getProduceUnit() {
        return produceUnit;
    }

    public void setProduceUnit(String produceUnit) {
        this.produceUnit = produceUnit == null ? null : produceUnit.trim();
    }

    public Integer getProduceNum() {
        return produceNum;
    }

    public void setProduceNum(Integer produceNum) {
        this.produceNum = produceNum;
    }

    public Integer getProducePeriod() {
        return producePeriod;
    }

    public void setProducePeriod(Integer producePeriod) {
        this.producePeriod = producePeriod;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getHashValue() {
        return hashValue;
    }

    public void setHashValue(String hashValue) {
        this.hashValue = hashValue == null ? null : hashValue.trim();
    }


    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ProducePlan other = (ProducePlan) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
            && (this.getProduceTime() == null ? other.getProduceTime() == null : this.getProduceTime().equals(other.getProduceTime()))
            && (this.getProduceName() == null ? other.getProduceName() == null : this.getProduceName().equals(other.getProduceName()))
            && (this.getProduceUnit() == null ? other.getProduceUnit() == null : this.getProduceUnit().equals(other.getProduceUnit()))
            && (this.getProduceNum() == null ? other.getProduceNum() == null : this.getProduceNum().equals(other.getProduceNum()))
            && (this.getProducePeriod() == null ? other.getProducePeriod() == null : this.getProducePeriod().equals(other.getProducePeriod()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getHashValue() == null ? other.getHashValue() == null : this.getHashValue().equals(other.getHashValue()));
    }


    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
        result = prime * result + ((getProduceTime() == null) ? 0 : getProduceTime().hashCode());
        result = prime * result + ((getProduceName() == null) ? 0 : getProduceName().hashCode());
        result = prime * result + ((getProduceUnit() == null) ? 0 : getProduceUnit().hashCode());
        result = prime * result + ((getProduceNum() == null) ? 0 : getProduceNum().hashCode());
        result = prime * result + ((getProducePeriod() == null) ? 0 : getProducePeriod().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getHashValue() == null) ? 0 : getHashValue().hashCode());
        return result;
    }


    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userName=").append(userName);
        sb.append(", produceTime=").append(produceTime);
        sb.append(", produceName=").append(produceName);
        sb.append(", produceUnit=").append(produceUnit);
        sb.append(", produceNum=").append(produceNum);
        sb.append(", producePeriod=").append(producePeriod);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", hashValue=").append(hashValue);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}